//
//  SINACheckStatueTableViewCell.m
//  sinashebao
//
//  Created by  androidlongs on 2017/11/30.
//  Copyright © 2017年  androidlongs. All rights reserved.
//

#import "SINACheckStatueTableViewCell.h"


@interface SINACheckStatueTableViewCell()
@property (weak, nonatomic) IBOutlet UIImageView *checkStatueImageView;
@property (weak, nonatomic) IBOutlet UILabel *chekcStatueDesLabel;
@property (weak, nonatomic) IBOutlet UILabel *checkTimeLable;

@end

@implementation SINACheckStatueTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

-(void)setCheckModel:(SINACheckModel *)checkModel{
    _checkModel = checkModel;
    
    self.checkTimeLable.text = checkModel.addTime;
    
    NSString *flag = checkModel.flag;
    if (flag==nil||[flag intValue]==2) {
        self.chekcStatueDesLabel.text=@"检测未通过";
        self.checkStatueImageView.image=[UIImage imageNamed:@"icon_5"];
        [self.chekcStatueDesLabel setTextColor:[UIColor redColor]];
    }else{
        self.checkStatueImageView.image=[UIImage imageNamed:@"icon_6"];
        self.chekcStatueDesLabel.text=@"检测已通过";
        [self.chekcStatueDesLabel setTextColor:[UIColor greenColor]];
    }
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
